import service from '@/utils/request';

// 获取视频列表
export function getVideoList(data) {
  return service({
    url: `/api/system/space/findMediaPage`,
    method: 'post',
    data,
  });
}

// 删除视频
export function delVideo(id) {
  return service({
    url: `/api/system/space/deleteMedia?sysMediaId=${id}`,
    method: 'get',
  });
}

// 添加修改视频
export function addVideoModify(data) {
  return service({
    url: `/api/system/space/modifyMedia`,
    method: 'post',
    data,
  });
}

// 视频详情
export function getVideoDetails(id) {
  return service({
    url: `/api/system/space/findMediaDetail?sysMediaId=${id}`,
    method: 'get',
  });
}

// 空间名称下拉
export function getSpaceList() {
  return service({
    url: `/api/system/space/spaceList`,
    method: 'post',
  });
}
